#!/usr/bin/python
# -*- coding: utf-8 -*-
# author: yoshiii.yoshiii@googlemail.com
# you found this code on http://yoshiii-box.googlecode.com/svn/ 
#


import sys, os, tempfile
from shutil import move
if "." not in sys.path: sys.path.append(".")
import recursive_par2


logfile = tempfile.NamedTemporaryFile()

paths = os.environ["NAUTILUS_SCRIPT_SELECTED_FILE_PATHS"]
paths = filter(os.path.isdir, paths)

pwd = os.environ["NAUTILUS_SCRIPT_CURRENT_URI"][len("file://"):]
os.chdir(pwd)
os.system('xterm -e "archive-images.py %s"'%(paths))

logfile.flush()
os.system("zenity --text-info --filename %s"%(logfile.name))

